package org.coding.springbootdemoredisstandalone;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableSwagger2
public class SpringbootDemoRedisStandaloneApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringbootDemoRedisStandaloneApplication.class, args);
	}

	@Bean
	public Docket api(){
		return new Docket(DocumentationType.SWAGGER_2)
				.apiInfo(apiInfo())
				.select()
				.build();
	}

	public ApiInfo apiInfo(){
		return new ApiInfoBuilder()
				.title("redis管理")
				.description("redis客户端管理")
				.termsOfServiceUrl("https://www.bad")
				.version("1.0")
				.contact(new Contact("aaa","bbb","ccc"))
				.build();
	}

}
